<!--<include file="Core_Extend::template('header')" />-->

<!--{script}-->
function showTag(){
	$('#addTag').toggle('fast');
}

function add(){
	if($('#hometag_name').val()==''){
		windsforceAlert(Q.L('用户标签不能为空','App'),'',3);
		return false;
	}

	$("#submit_button").attr("disabled","disabled");
	$("#submit_button").val('add...');

	Q.AjaxSubmit('hometagAdd','<!--{:Q::U('home://spaceadmin/add_hometag')}-->','',function(data,status){
		$("#submit_button").attr("disabled",false);
		$("#submit_button").val("<!--<lang package='Template'>-->添加<!--</lang>-->");
		
		if(status==1){
			setTimeout("window.location.replace(_SELF_);",1000);
		}
	});
}

function deleteHometag(tagid){
	windsforceConfirm(Q.L('确实要永久删除选择项吗？','Common'),function(){
		Q.AjaxSend(Q.U('home://spaceadmin/delete_hometag&id='+tagid),'','',completeDelete);
	});
}

function completeDelete(data,status){
	if(status==1){
		setTimeout("window.location.replace(_SELF_);",1000);
	}
}
<!--{/script}-->

	<div class="container_12">
		<ul class="breadcrumb">
			<li><a href="<!--{:__APP__}-->" title="<!--<lang package='__COMMON_LANG__@Common'>-->主页<!--</lang>-->"><!--<lang package='__COMMON_LANG__@Common'>-->主页<!--</lang>--></a>&nbsp;<span class="divider">/</span>&nbsp;</li>
			<li><a href="<!--{:Q::U('home://spaceadmin/index')}-->"><!--<lang package='Template'>-->用户资料<!--</lang>--></a> <span class="divider">/</span></li>
			<li><!--<lang package='Template'>-->用户标签<!--</lang>--></li>
		</ul>
	</div>

	<div class="container_12 container_box">
		<!--<include file="spaceadmin+menu" />-->

		<div class="grid_12">
			<!--{if !empty($arrHometags)}-->
			<!--<foreach for=arrHometags value=oHometag>-->
			<a href="javascript:void(0);" title="<!--<lang package='__COMMON_LANG__@Common'>-->删除<!--</lang>-->" onclick="deleteHometag('<!--{$oHometag['hometag_id']}-->');">x</a>&nbsp;
			<a class="common_tag"><!--{$oHometag['hometag_name']}--></a>&nbsp;&nbsp;&nbsp;
			<!--</foreach>-->
			<!--{d*else}-->
			<!--<lang package='Template'>-->你还没有个人标签，请点击添加。<!--</lang>-->
			<!--{/if}-->
			<button class="btn btn-small" onclick="showTag();">+<!--<lang package='Template'>-->添加新标签<!--</lang>--></button>
			<div id="addTag" class="none">
				<p><form action="<!--{:Q::U('spaceadmin/add_hometag')}-->" method="post" name="hometagAdd" id="hometagAdd" class="coords well form-inline">
					<input type="text" class="input-small" name="hometag_name" id="hometag_name">
					<input type="hidden" name="ajax" value="1">
					<input type="hidden" name="hometag_status" value="1">&nbsp;
					<button id="submit_button" type="button" onclick="add()" class="btn"><!--<lang package='Template'>-->添加<!--</lang>--></button>
					</form>
				</p>
			</div>
		</div>
		<div class="clearfix"></div>
	</div>

<!--<include file="Core_Extend::template('footer')" />-->